CC=/usr/local/bin/arm-apple-darwin-gcc
CFLAGS=-fsigned-char -g -ObjC -Wall -Wundeclared-selector -fobjc-exceptions -Wreturn-type -Wnested-externs -Wredundant-decls -Wbad-function-cast \
	-Wchar-subscripts -Winline -Wswitch -Wshadow -Wcast-qual
CPPFLAGS=
LD=$(CC)
LDFLAGS=-lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit \
	-framework CoreGraphics -framework WebCore -framework GraphicsServices \
	-L$(HEAVENLY)/usr/lib -lc /usr/local/arm-apple-darwin/lib/libgcc_s.1.dylib -lssl -lcrypto
EXECUTABLE=StorageTests

all: $(EXECUTABLE)
	
$(EXECUTABLE):	main.o LockboxStorage.o SSCrypto.o LockboxItem.o LockboxOptions.o parseCSV.o
	$(LD) $(LDFLAGS) -o $@ $^

main.o:	main.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

LockboxStorage.o:	../LockboxStorage.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

LockboxItem.o:	../LockboxItem.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

LockboxOptions.o: ../LockboxOptions.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

SSCrypto.o:	../SSCrypto.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

parseCSV.o:	../parseCSV.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
	rm -rf *.o StorageTests
